import request from '@/utils/request'

// 新增
export function save(data) {
  return request({
    url: '/projects/save',
    method: 'post',
    data
  })
}
// 编辑
export function update(data) {
  return request({
    url: '/projects/update',
    method: 'post',
    data
  })
}
// 删除
export function del(data) {
  return request({
    url: '/projects/delete',
    method: 'post',
    data
  })
}
// 获取列表
export function findList(companyId) {
  return request({
    url: '/projects/findAllByCompanyId',
    method: 'get',
    params: { companyId: companyId }
  })
}
// 根据id获取实体类
export function findById(projectsId) {
  return request({
    url: '/projects/findById',
    method: 'get',
    params: { projectsId }
  })
}
// 根据名字查询findByNameLike
export function findByNameLike(params) {
  return request({
    url: '/projects/findByNameLike',
    method: 'get',
    params
  })
}
